.giftcert {
  $gift-cert-height: 174px;
  @include size(315px, $gift-cert-height);
  &.small {
    @include size(274px, $gift-cert-height);
  }
  border-radius: 5px;
  border: 1px solid $colorLightGrey;
  background-color: $colorLightBeige;
  position: relative;
  overflow: hidden;

  .content {
    position: absolute;
    top: 35px;
    left: 35px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  &-title {
    margin: 5px 0 12px 0;
  }

  &-expire {
    display: flex;
    align-items: center;

    .tag {
      display: inline-block;
      font-family: $notoSans;
      font-size: 10px;
      color: rgba($colorGrey, 0.7);
      padding: 3px 12px 3px 0;
      margin-right: 12px;
      border-right: 1px solid rgba($colorGrey, 0.7);
      line-height: 1;
    }

    .expiry-date {
      line-height: 1;
    }
  }

  &-view-link {
    @include link-text($colorVulcan);
    display: inline-block;
    color: $colorVulcan;
    font-family: $notoSans;
    font-size: $paragraph;
  }

  // Geometric ornaments part
  .ornament {
    $background-width: 80px;
    $polygon-width: $background-width - 14px;
    $triangle-width: 94px;

    &-background {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: $background-width;
      background-color: $colorLightGrey;
    }

    &-polygon {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: $polygon-width;
      clip-path: polygon(48px 0%, 100% 0, 100% 100%, 48px 100%, 0 50%);
    }

    &-triangle-top {
      position: absolute;
      top: 0;
      right: $background-width - math.div($triangle-width, 2);
      bottom: math.div($gift-cert-height, 2);
      width: $triangle-width;
      clip-path: polygon(0 0, 100% 0, 50% 100%);
    }
    &-triangle-bottom {
      position: absolute;
      top: math.div($gift-cert-height, 2);
      right: $background-width - math.div($triangle-width, 2);
      bottom: 0;
      width: $triangle-width;
      clip-path: polygon(50% 0, 100% 100%, 0 100%);
    }
  }
}
